using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication11.Models.Mapping
{
    public class incentive_typeMap : EntityTypeConfiguration<incentive_type>
    {
        public incentive_typeMap()
        {
            // Primary Key
            this.HasKey(t => t.rule_type_id);

            // Properties
            this.Property(t => t.rule_type_name)
                .HasMaxLength(50);

            this.Property(t => t.rule_type_desc)
                .HasMaxLength(200);

            this.Property(t => t.rule_type_name_en_US)
                .HasMaxLength(50);

            // Table & Column Mappings
            this.ToTable("incentive_type");
            this.Property(t => t.rule_type_id).HasColumnName("rule_type_id");
            this.Property(t => t.rule_type_name).HasColumnName("rule_type_name");
            this.Property(t => t.rule_type_desc).HasColumnName("rule_type_desc");
            this.Property(t => t.rule_type_name_en_US).HasColumnName("rule_type_name!en-US");
        }
    }
}
